#include <iostream>
class Fraction
{
public:
	explicit Fraction(int num, int den = 1)
		:m_numerator(num), m_denominator(den) {};
	operator double() const {
		return (double)m_numerator / (double)m_denominator;
	}
	Fraction operator +(const Fraction& f) 
	{
		return Fraction(this->m_numerator + f.m_numerator,this->m_denominator+f.m_denominator);
	}

private:
	int m_numerator;
	int m_denominator;
};

int main()
{
	Fraction f(3, 1);
	Fraction d2 = f + 4;
	std::cout << d2 << std::endl;
	return 0;
}
